<?php if ( ! defined('APPPATH')) exit('No direct script access allowed');
/**
 *      [PinTuXiu] (C)2001-2099 ONightjar.com Pintuxiu.com.
 *      This is NOT a freeware, use is subject to license terms
 */

class album_controller extends PZ_Controller{
	
	public function __construct() {
		parent::__construct();
	}
	public function beforeAction(){
		$result = parent::beforeAction();
		if($result){
			if(in_array($this->method , array('listalbums'))&&!$this->islogin){
				$this->jump(site_url('user/login'));
				return FALSE;
			}
			return TRUE;
		}
		return FALSE;
	}

	public function listcategoryhottags(){
		$api = load_api('tag');
		$albums = $api->getAlbumsByUser($this->cuser['uid']);
		if($albums){
			$this->ajax_success_response($albums, '');
		}else{
			$this->ajax_failed_response();
		}
		return;
	}
}



